package ipms.necfgsyn;

import java.util.HashMap;

import org.snmp4j.smi.OID;

/**
 * 
 * @author spdjnh
 * @created on 2012.12.31
 * @function 定义mib常量
 */
public final class MibConst {
	
	//RowStatus from Module:	SNMPv2-TC
	
//	public static final String[] RowStatus = new String[7];
	//
//		static {
//			//RowStatus,Module:	SNMPv2-TC
//			RowStatus[0] = "(0)";
//			RowStatus[1] = "active(1)";
//			RowStatus[2] = "notInService(2)";
//			RowStatus[3] = "notReady(3)";
//			RowStatus[4] = "createAndGo(4)";
//			RowStatus[5] = "createAndWait(5)";
//			RowStatus[6] = "destroy(6)";
//		}
	
	//for tmnxChassisTable.tmnxChassisRowStatus
	private static final String[] RowStatus = new String[] {
		"(0)",
		"active(1)",
		"notInService(2)",
		"notReady(3)",
		"createAndGo(4)",
		"createAndWait(5)",
		"destroy(6)"
	};
	public static String RowStatus(int idx) {
		if(idx<RowStatus.length)
			return RowStatus[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	////////////////////////////////
	//Module:	TIMETRA-CHASSIS-MIB
	////////////////////////////////
	
	//机框
	public static final HashMap<String,OID> tmnxChassisTable = new HashMap<String,OID>();
	static {
		tmnxChassisTable.put("tmnxChassisRowStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.3.1.2"));
		tmnxChassisTable.put("tmnxChassisName", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.3.1.3"));
		tmnxChassisTable.put("tmnxChassisType", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.3.1.4"));
		tmnxChassisTable.put("tmnxChassisBaseMacAddress", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.3.1.15"));
	}
	
	public static final HashMap<String,OID> tmnxChassisTypeTable = new HashMap<String,OID>();
	static {
		tmnxChassisTypeTable.put("tmnxChassisTypeName", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.6.1.2"));
	}
	
	//for tmnxChassisFanTable.tmnxChassisFanSpeed
	private static final String[] ChassisFanSpeed = new String[] {
		"(0)",
		"unknown(1)",
		"halfSpeed(2)",
		"fullSpeed(3)"
	};
	public static String ChassisFanSpeed(int idx) {
		if(idx<ChassisFanSpeed.length)
			return ChassisFanSpeed[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxChassisFanTable.tmnxChassisFanOperStatus
	private static final String[] TmnxDeviceState = new String[] {
		"(0)",
		"deviceStateUnknown(1)",
		"deviceNotEquipped(2)",
		"deviceStateOk(3)",
		"deviceStateFailed(4)",
		"deviceStateOutOfService(5)"
	};
	public static String TmnxDeviceState(int idx) {
		if(idx<TmnxDeviceState.length)
			return TmnxDeviceState[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//风扇
	public static final HashMap<String,OID> tmnxChassisFanTable = new HashMap<String,OID>();
	static {
		tmnxChassisFanTable.put("tmnxChassisFanOperStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.4.1.2"));
		tmnxChassisFanTable.put("tmnxChassisFanSpeed", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.4.1.3"));
	}
	
	
	//for tmnxChassisPowerSupplyTable.tmnxChassisPowerSupplyAssignedType
	private static final String[] TmnxChassisPowerSupplyAssignedType = new String[] {
		"(0)",
		"none(1)",
		"dc(2)",
		"acSingle(3)",
		"acMultiple(4)"
	};
	public static String TmnxChassisPowerSupplyAssignedType(int idx) {
		if(idx<TmnxChassisPowerSupplyAssignedType.length)
			return TmnxChassisPowerSupplyAssignedType[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//电源
	public static final HashMap<String,OID> tmnxChassisPowerSupplyTable = new HashMap<String,OID>();
	static {
		tmnxChassisPowerSupplyTable.put("tmnxChassisPowerSupplyACStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.5.1.2"));
		tmnxChassisPowerSupplyTable.put("tmnxChassisPowerSupplyDCStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.5.1.3"));
		tmnxChassisPowerSupplyTable.put("tmnxChassisPowerSupply1Status", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.5.1.6"));
		tmnxChassisPowerSupplyTable.put("tmnxChassisPowerSupply2Status", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.5.1.7"));
		tmnxChassisPowerSupplyTable.put("tmnxChassisPowerSupplyAssignedType", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.5.1.8"));
	}
	
	
	//for tmnxHwTable.tmnxHwClass
	private static final String[] TmnxHwClass = new String[] {
		"(0)",
		"other(1)",
		"unknown(2)",
		"chassis(3)",
		"container(4)",
		"powerSupply(5)",
		"fan(6)",
		"sensor(7)",
		"ioModule(8)",
		"cpmModule(9)",
		"fabricModule(10)",
		"mdaModule(11)",
		"flashDiskModule(12)",
		"port(13)",
		"mcm(14)",
		"ccm(15)"            
	};
	public static String TmnxHwClass(int idx) {
		if(idx<TmnxHwClass.length)
			return TmnxHwClass[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxHwTable.tmnxHwAdminState
	private static final String[] TmnxHwAdminState = new String[] {
		"(0)",
		"noop(1)",
		"inService(2)",
		"outOfService(3)",
		"diagnose(4)",
		"operateSwitch(5)"
	};
	public static String TmnxHwAdminState(int idx) {
		if(idx<TmnxHwAdminState.length)
			return TmnxHwAdminState[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxHwTable.tmnxHwOperState
	private static final String[] TmnxHwOperState = new String[] {
		"(0)",
		"unknown(1)",
		"inService(2)",
		"outOfService(3)",
		"diagnosing(4)",
		"failed(5)",
		"booting(6)",
		"empty(7)",
		"provisioned(8)",
		"unprovisioned(9)",
		"upgrade(10)",
		"downgrade(11)",
		"inServiceUpgrade(12)",
		"inServiceDowngrade(13)",
		"resetPending(14)",
		"softReset(15)"         
	};
	public static String TmnxHwOperState(int idx) {
		if(idx<TmnxHwOperState.length)
			return TmnxHwOperState[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//硬件信息表
	public static final HashMap<String,OID> tmnxHwTable = new HashMap<String,OID>();
	static {
		tmnxHwTable.put("tmnxHwClass", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.8.1.7"));
		tmnxHwTable.put("tmnxHwName", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.8.1.8"));
		tmnxHwTable.put("tmnxHwAdminState", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.8.1.15"));
		tmnxHwTable.put("tmnxHwOperState", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.8.1.16"));
		tmnxHwTable.put("tmnxHwBaseMacAddress", new OID("1.3.6.1.4.1.6527.3.1.2.2.1.8.1.29"));
	}
	
	//for tmnxCardTypeTable.tmnxCpmCardCpuType
	private static final String[] TmnxCpmCardCpuType = new String[] {
		"(0)",
		"unknown(1)",
		"mips(2)",
		"pentium-pc(3)"
	};
	public static String TmnxCpmCardCpuType(int idx) {
		if(idx<TmnxCpmCardCpuType.length)
			return TmnxCpmCardCpuType[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxCpmCardTable.tmnxCpmCardAssignedType,tmnxCpmCardTable.tmnxCpmCardEquippedType
	public static final HashMap<String,OID> tmnxCardTypeTable = new HashMap<String,OID>();
	static {
		tmnxCardTypeTable.put("tmnxCardTypeName", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.9.1.2")); 
		tmnxCardTypeTable.put("tmnxCardTypeDescription", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.9.1.3"));
	}
	
	//主控卡槽
	public static final HashMap<String,OID> tmnxCpmCardTable = new HashMap<String,OID>();
	static {
		tmnxCpmCardTable.put("tmnxCpmCardAssignedType", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.4.1.5"));
		tmnxCpmCardTable.put("tmnxCpmCardEquippedType", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.4.1.6"));
		tmnxCpmCardTable.put("tmnxCpmCardHwIndex", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.4.1.7"));
		tmnxCpmCardTable.put("tmnxCpmCardNumCpus", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.4.1.16"));
		tmnxCpmCardTable.put("tmnxCpmCardCpuType", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.4.1.17"));
		tmnxCpmCardTable.put("tmnxCpmCardMemorySize", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.4.1.18"));
	}
	
	//闪存
	public static final HashMap<String,OID> tmnxCpmFlashTable = new HashMap<String,OID>();
	static {
		tmnxCpmFlashTable.put("tmnxCpmFlashOperStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.7.1.2"));
		tmnxCpmFlashTable.put("tmnxCpmFlashSerialNumber", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.7.1.3")); 
		tmnxCpmFlashTable.put("tmnxCpmFlashFirmwareRevision", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.7.1.4"));
		tmnxCpmFlashTable.put("tmnxCpmFlashModelNumber", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.7.1.5"));
		tmnxCpmFlashTable.put("tmnxCpmFlashCapacity", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.7.1.6")); 
		tmnxCpmFlashTable.put("tmnxCpmFlashUsed", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.7.1.7"));
		tmnxCpmFlashTable.put("tmnxCpmFlashHwIndex", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.7.1.8"));
	}
	
	//板卡槽
	public static final HashMap<String,OID> tmnxCardTable = new HashMap<String,OID>();
	static {
		tmnxCardTable.put("tmnxCardAssignedType", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.2.1.4"));
		tmnxCardTable.put("tmnxCardEquippedType", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.2.1.5")); 
		tmnxCardTable.put("tmnxCardMemorySize", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.2.1.14"));
		tmnxCardTable.put("tmnxCardHwIndex", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.2.1.6"));
		tmnxCardTable.put("tmnxCardNamedPoolAdminMode", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.2.1.15"));
		tmnxCardTable.put("tmnxCardNamedPoolOperMode", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.2.1.16"));
	}
	
	//for tmnxMDATable:tmnxMDAAllowedTypes,tmnxMDAAssignedType,tmnxMDAEquippedType
	public static final HashMap<String,OID> tmnxMdaTypeTable = new HashMap<String,OID>();
	static {
		tmnxMdaTypeTable.put("tmnxMdaTypeName", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.10.1.2")); 
		tmnxMdaTypeTable.put("tmnxMdaTypeDescription", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.10.1.3"));
	}
	
	//for tmnxMDATable.tmnxMDATxTimingSelected
	private static final String[] TmnxMDATxTimingSelected = new String[] {
		"(0)",
		"cpm-card-A(1)",
		"cpm-card-B(2)",
		"local(3)",
		"holdover(4)",
		"not-applicable(5)"
	};
	public static String TmnxMDATxTimingSelected(int idx) {
		if(idx<TmnxMDATxTimingSelected.length)
			return TmnxMDATxTimingSelected[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxMDATable.tmnxMDASyncIfTimingStatus
	private static final String[] TmnxMDASyncIfTimingStatus = new String[] {
		"(0)",
		"qualified(1)",
		"not-qualified(2)",
		"not-applicable(3)"
	};
	public static String TmnxMDASyncIfTimingStatus(int idx) {
		if(idx<TmnxMDASyncIfTimingStatus.length)
			return TmnxMDASyncIfTimingStatus[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxMDATable: tmnxMDAMinChannelization,tmnxMDAMaxChannelization
	private static final String[] TmnxMDAChanType = new String[] {
		"unknown(0)",
	 	"sonetSts768(1)",
	 	"sonetSts192(2)",
	 	"sonetSts48(3)",
	 	"sonetSts12(4)",
	 	"sonetSts3(5)",
	 	"sonetSts1(6)",
	 	"sdhTug3(7)",
	 	"sonetVtg(8)",
	 	"sonetVt15(9)",
	 	"sonetVt2(10)",
	 	"sonetVt3(11)",
	 	"sonetVt6(12)",
	 	"pdhTu3(13)",
	 	"pdhDs3(14)",
	 	"pdhE3(15)",
	 	"pdhDs1(16)",
	 	"pdhE1(17)",
	 	"pdhDs0Grp(18)" 
	};
	public static String TmnxMDAChanType(int idx) {
		if(idx<TmnxMDAChanType.length)
			return TmnxMDAChanType[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//子板卡槽
	public static final HashMap<String,OID> tmnxMDATable = new HashMap<String,OID>();
	static {
		tmnxMDATable.put("tmnxMDAAllowedTypes", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.3"));
		tmnxMDATable.put("tmnxMDAAssignedType", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.4")); 
		tmnxMDATable.put("tmnxMDAEquippedType", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.5"));
		tmnxMDATable.put("tmnxMDAMaxPorts", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.7"));
		tmnxMDATable.put("tmnxMDAEquippedPorts", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.8"));
		tmnxMDATable.put("tmnxMDATxTimingSelected", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.10"));
		tmnxMDATable.put("tmnxMDASyncIfTimingStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.11"));
		tmnxMDATable.put("tmnxMDANetworkIngQueues", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.12"));
		tmnxMDATable.put("tmnxMDACapabilities", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.13")); 
		tmnxMDATable.put("tmnxMDAMinChannelization", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.14"));
		tmnxMDATable.put("tmnxMDAMaxChannelization", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.15"));
		tmnxMDATable.put("tmnxMDAHwIndex", new OID("1.3.6.1.4.1.6527.3.1.2.2.3.8.1.6")); 
		
	}
	
	/**
	 * 
	 * @param str 形式如“34:80”
	 * @return “34:80(hex) [isTDM(2) | supportsPPP(3) | supportsATM(5) | supportsCEM(8)]" 
	 */
	public static String getMDACapabilities(String str) {
		String[] sa = str.split(":");
		int i1 = Integer.parseInt(sa[0],16),i2 = Integer.parseInt(sa[1],16);
		
		String[] ss = new String[] {
			"isEthernet(0)",
			"isSonet(1)",
			"isTDM(2)",
			"supportsPPP(3)",
			"supportsFR(4)",
			"supportsATM(5)",
			"supportscHDLC(6)",
			"isCMA(7)",
			"supportsCEM(8)"   
		};
		
		String s = str + "(hex) [";
		
		for(int i=7; i>=0; i--) {
			int im = (int) Math.pow(2, i);
			if((i1 & im) != 0) 
				s += ss[7-i] + "|";
		}
		
		if((i2 & 128) !=0 )
			s += ss[8] + "]";
		else if(s.endsWith("|"))
			s = s.substring(0,s.length()-1) + "]";
		else
			s = s + "]";
		
		
		return s;
	}
	
	////////////////////////////////
	//Module:	TIMETRA-PORT-MIB
	////////////////////////////////
	
	//端口
	public static final HashMap<String,OID> tmnxPortTable = new HashMap<String,OID>();
	static {
		tmnxPortTable.put("tmnxPortType", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.3"));
		tmnxPortTable.put("tmnxPortClass", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.4")); 
		tmnxPortTable.put("tmnxPortName", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.6"));
		tmnxPortTable.put("tmnxPortMacAddress", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.9"));
		tmnxPortTable.put("tmnxPortHwMacAddress", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.10"));
		tmnxPortTable.put("tmnxPortMode", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.11"));
		tmnxPortTable.put("tmnxPortAdminStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.37"));
		tmnxPortTable.put("tmnxPortOperStatus", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.38"));
		tmnxPortTable.put("tmnxPortState", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.39")); 
		tmnxPortTable.put("tmnxPortEncapType", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.2.1.12")); 
	}
	
	/*
	 * A portid is an unique 32 bit number encoded as shown below.
 	
 	32 30 | 29 26 | 25 22 | 21 16 | 15  1 |
 	+-----+-------+-------+-------+-------+
 	|000  |  slot |  mda  | port  |  zero | Physical Port
 	+-----+-------+-------+-------+-------+
 	
 	32 30 | 29 26 | 25 22 | 21 16 | 15  1 |
 	+-----+-------+-------+-------+-------+
 	|001  |  slot |  mda  | port  |channel| Channel
 	+-----+-------+-------+-------+-------+
 	
 	Slots, mdas (if present), ports, and channels are numbered
 	starting with 1.
 	
 	32     29 | 28             10 | 9   1 |
 	+---------+-------------------+-------+
 	| 0 1 0 0 |   zeros           |   ID  | Virtual Port
 	+---------+-------------------+-------+
 	
 	32     29 | 28                9 | 8 1 |
 	+---------+---------------------+-----+
 	| 0 1 0 1 |   zeros             | ID  | LAG Port
 	+---------+---------------------+-----+
 	
 	A card port number (cpn) has significance within the context
 	of the card on which it resides(ie., cpn 2 may exist in one or
 	more cards in the chassis).  Whereas, portid is an
 	unique/absolute port number (apn) within a given chassis.
 	
 	An 'invalid portid' is a TmnxPortID with a value of 0x1e000000 as 
 	represented below.
 	
 	32 30 | 29 26 | 25 22 | 21 16 | 15  1 |
 	+-----+-------+-------+-------+-------+
 	|zero | ones  | zero  |  zero |  zero | Invalid Port
 	+-----+-------+-------+-------+-------+

	 */
	public static String getPortAttrib(int iPortId) {
		String s = "",sct = "";
		int ict = (iPortId & 0xE000) >>> 29;
		int islot = (iPortId & 0x1E000000) >>> 25;
		int imda = (iPortId & 0x1E00000) >>> 21;
		
		if(ict == 0) {
			sct = "Physical Port";
		} else if(ict == 1) {
			sct = "Channel";
		} else {
			islot = 0;
			imda = 0;
			ict = (iPortId & 0xF000) >>> 28;
			if(ict == 4) {
				sct = "Virtual Port";
			} else if (ict == 5) {
				sct = "LAG Port";
			} else {
				sct = "Invalid Port";
			}
			
		}
		
		s = String.valueOf(islot) + "," + String.valueOf(imda) + ",'" + sct + "'";
		return s;
	}
	
	//for tmnxPortTable.tmnxPortType
	public static final HashMap<String,OID> tmnxPortTypeTable = new HashMap<String,OID>();
	static {
		tmnxPortTypeTable.put("tmnxMdaTypeName", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.7.1.2")); 
		tmnxPortTypeTable.put("tmnxPortTypeDescription", new OID("1.3.6.1.4.1.6527.3.1.2.2.4.7.1.3"));
	}
	
	//for tmnxPortTable.tmnxPortClass
	private static final String[] TmnxPortClass = new String[] {
		"unknown(0)",
	 	"none(1)",    
		"faste(2)",   
		"gige(3)",    
		"xgige(4)",   
		"sonet(5)",   
		"vport(6)",   
		"unused(7)",  
		"xcme(8)",    
		"tdm(9)",     
		"xlgige(10)"
	};
	public static String TmnxPortClass(int idx) {
		if(idx<TmnxPortClass.length)
			return TmnxPortClass[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxPortTable.tmnxPortMode
	private static final String[] TmnxPortMode = new String[] {
		"undefined(0)",
	 	"access(1)",    
		"network(2)"
	};
	public static String TmnxPortMode(int idx) {
		if(idx<TmnxPortMode.length)
			return TmnxPortMode[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxPortTable.tmnxPortAdminStatus
	private static final String[] TmnxPortAdminStatus = new String[] {
		"(0)",
	 	"noop(1)",    
		"inService(2)",
		"outOfService(3)",
		"diagnose(4)"
	};
	public static String TmnxPortAdminStatus(int idx) {
		if(idx<TmnxPortAdminStatus.length)
			return TmnxPortAdminStatus[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxPortTable.tmnxPortOperStatus
	private static final String[] TmnxPortOperStatus = new String[] {
		"(0)",
	 	"unknown(1)",    
		"inService(2)",
		"outOfService(3)",
		"diagnosing(4)",
		"failed(5)"
	};
	public static String TmnxPortOperStatus(int idx) {
		if(idx<TmnxPortOperStatus.length)
			return TmnxPortOperStatus[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//for tmnxPortTable.tmnxPortState
	private static final String[] TmnxPortState = new String[] {
		"(0)",
	 	"none(1)",    
		"ghost(2)",
		"linkDown(3)",
		"linkUp(4)",
		"up(5)",
		"diagnose(6)"
	};
	public static String TmnxPortState(int idx) {
		if(idx<TmnxPortState.length)
			return TmnxPortState[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	////////////////////////////////
	//Module:	TIMETRA-SERV-MIB
	////////////////////////////////
	
	//服务客户信息表
	public static final HashMap<String,OID> custInfoTable = new HashMap<String,OID>();
	static {
		custInfoTable.put("custId", new OID("1.3.6.1.4.1.6527.3.1.2.4.1.3.1.1"));
		custInfoTable.put("custDescription", new OID("1.3.6.1.4.1.6527.3.1.2.4.1.3.1.3")); 
		custInfoTable.put("custContact", new OID("1.3.6.1.4.1.6527.3.1.2.4.1.3.1.4"));
		custInfoTable.put("custPhone", new OID("1.3.6.1.4.1.6527.3.1.2.4.1.3.1.5"));
	}
	
	
	////////////////////////////////
	//Module:	TIMETRA-SDP-MIB
	////////////////////////////////

	//for sdpInfoTable.sdpOperStatus
	private static final String[] sdpOperStatus = new String[] {
		"(0)",
		"up(1)",
		"notAlive(2)",
		"notReady(3)",
		"invalidEgressInterface(4)",
		"transportTunnelDown(5)",
		"down(6)"
	};
	public static String sdpOperStatus(int idx) {
		if(idx<sdpOperStatus.length)
			return sdpOperStatus[idx];
		else
			return "unknown("+String.valueOf(idx) + ")";
	}
	
	//SDP信息表
	public static final HashMap<String,OID> sdpInfoTable = new HashMap<String,OID>();
	static {
		sdpInfoTable.put("sdpId", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.1"));
		sdpInfoTable.put("sdpDelivery", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.3")); 
		sdpInfoTable.put("sdpFarEndIpAddress", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.4"));
		sdpInfoTable.put("sdpLspList", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.5"));
		sdpInfoTable.put("sdpDescription", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.6"));
		sdpInfoTable.put("sdpLabelSignaling", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.7")); 
		sdpInfoTable.put("sdpAdminStatus", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.8"));
		sdpInfoTable.put("sdpOperStatus", new OID("1.3.6.1.4.1.6527.3.1.2.4.4.3.1.9"));
	}
}
